package com.qc.controller;

import com.qc.dto.Result;
import com.qc.service.IFridgeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("fridge")
@CrossOrigin
public class FridgeController {
    @Autowired
    IFridgeMapper fridgeMapper;
    @GetMapping("getCount/{bid}")
    public Result<Integer> getCount (@PathVariable  String bid) {
        int i = fridgeMapper.getCount( bid);
        return Result.successResult(i);
    }
}
